package com.easychat.entity.enums;

import lombok.Getter;

/**
 * 响应报错 枚举类
 * @author Admin
 * @version 1.0
 * @description: TODO
 * @date 2024/6/25 20:28
 */
@Getter
public enum ResponseCodeEnum {
    SUCCESS(200,"successful"),
    FAIL(201, "fail"),
    SERVICE_ERROR(2012, "service error"),
    DATA_ERROR(204, "data error"),
    ILLEGAL_REQUEST(205, "illegal request"),
    REPEAT_SUBMIT(206, "repeat submit"),
    ARGUMENT_VALID_ERROR(210, "argument valid error"),

    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限"),
    ACCOUNT_ERROR(214, "账号不正确"),
    PASSWORD_ERROR(215, "密码不正确"),
    LOGIN_MOBLE_ERROR( 216, "账号不正确"),
    ACCOUNT_STOP( 217, "账号已停用"),
    NODE_ERROR( 218, "该节点下有子节点，不可以删除"),

    CODE_404(404, "请求地址不存在"),

    CODE_500(500, "服务器报错"),
    CODE_600(600, "业务错误"),
    CODE_601(601, "主键冲突")
    ;

    private Integer code;

    private String message;

    //构造器
    private ResponseCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}

